﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using LongQuanWeb.App_Code;

namespace LongQuanWeb.Homes
{
    public partial class Rights : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Bind();
            }
        }

        private void Bind()
        {
            //EquityType 1 常见问题 
            string strSql = "Select Top 10 * From dbo.Equity Where EquityType='1' Order by EquityID desc ";
            DataTable dt = DbHelperSQL.Query(strSql).Tables[0];
            this.rpt_problems.DataSource = dt;
            this.rpt_problems.DataBind();
            //EquityType 2 维权措施 
            strSql = "Select Top 10 * From dbo.Equity Where EquityType='2' Order by EquityID desc";
            dt = DbHelperSQL.Query(strSql).Tables[0];
            this.rpt_right.DataSource = dt;
            this.rpt_right.DataBind();
        }
    }
}
